{extend name="../view/admin/base.html" /}
{block name="body"}
<div class="panel panel-default">
    <div class="panel-heading">
        <a class="btn btn-xs btn-info" href="{:addons_url('add')}">添加</a>
    </div>
    <div class="panel-body">
        <div class="table-responsive">
            <table class="table table-bordered table-hover mb-0">
                <thead>
                    <tr>
                        <th>编号</th>
                        <th>导航名称</th>
                        <th>图片</th>
                        <th>介绍</th>
                        <th>跳转地址</th>
                        <th>排序</th>
                        <th>状态</th>
                        <th>添加时间</th>
                        <th>更新时间</th>
                        <th>操作</th>
                    </tr>
                </thead>
                <tbody>
                    <?php foreach($list as $v):?>
                    <tr>
                        <td>{$v.id}</td>
                        <td>{$v.name}</td>
                        <td>
                            <img src="{$v.photo.domain}{$v.photo.path}" alt="{$v.name}" style="max-width: 100px;max-height: 100px;" class="media-object rounded">
                        </td>
                        <td>{$v.desc}</td>
                        <td>{$v.url}</td>
                        <td>{$v.sort}</td>
                        <td>{$v.status}</td>
                        <td>{$v.create_time}</td>
                        <td>{$v.update_time}</td>
                        <td class="text-center">
                            <a href="{:url('edit',['id'=>$v['id']])}" class="btn btn-xs btn-warning">编辑</a>
                            <button class="btn btn-xs btn-danger delclick" data-id="{$v['id']}">删除</button>
                        </td>
                    </tr>
                    <?php endforeach;?>
                </tbody>
            </table>
        </div>
    </div>
</div>
{/block}